package P1线性结构.LeetCode双指针;

public class LeetCode80 {
    public int removeDuplicates(int[] nums) {
        int k = 2;
        for (int i = 2; i < nums.length; i++) {
            if (nums[i] > nums[k - 2]) {
                nums[k++] = nums[i];
            }
        }
        return k;//[0,k)
    }
}
